<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Str;

class LogAnalyzeController extends Controller
{
    public function sc()
    {
        ini_set('memory_limit', '2048M');

        $handle = fopen('/www/wwwlogs/sc.mifxcx.com.log', 'r');

        if (!$handle) return '文件打开失败';

        $data = collect();
        while ($line = fgetcsv($handle, 0, ',')) {
            $data->add($line);
        }
        fclose($handle);

        $data->dd();
    }
}
